{extend name="Layout/datagrid" /}
{block name="content_header"}        
<h1>
    网站设置
    <small>advanced tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="#">系统</a></li>
    <li class="active">网站设置</li>
</ol>
{/block}
{block name="content"}
<div class="box">
    <div class="box-header">
        <ul class="nav nav-tabs">
            {foreach name="tabs" item="vo"}
            <li class="{$vo.active}"><a href="{:U($vo['url'])}">{$vo.title}</a></li>
            {/foreach}
        </ul>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-info" data-url="{:U('edit')}" title="更新数据库索引">更新索引</button>
                <button type="button" class="btn btn-info" data-url="{:U('edit')}" title="清空缓存">清空缓存</button>
                <button type="button" class="btn btn-info" data-url="{:U('edit')}" title="数据库瘦身">数据库瘦身</button>
                <button type="button" class="btn btn-info" data-url="{:U('edit')}" title="数据清理">数据清理</button>
            </div>
        </div>
    </div>
    {/block}
    {block name="script_after"}
    <script>
        $(function () {
            $('.xsui-tabs a').click(function () {
                toggle_fields($(this).attr('href').substring(1));
                $('.xsui-tabs li').removeClass('ui-state-active').addClass('ui-state-default');
                $(this).parent().removeClass('ui-state-default').addClass('ui-state-active');
            })
            toggle_fields('B');
        })
        // 切换字段 2015-11-7 SoChishun Added.
        function toggle_fields(group) {
            $('.xsui-form-field').hide();
            $('.xsui-form-field[data-group="' + group + '"]').show();
        }
    </script>
    {/block}